@echo off

set _BaseDir=%CD%
ECHO _BaseDir is %_BaseDir%
ECHO if nothing happens check your base directory 

::The normal outpout of the docs generation will be saved here
set _RunLog=%0.log
ECHO _RunLog is %_RunLog%

::The errors of the docs generation will be saved here
set _ErrorLog=%0.error.log
ECHO _ErrorLog is %_ErrorLog%

::clear the RunLog and the ErrorLog and record the time of the run
ECHO DATE IS %DATE% TIME IS %TIME%  >%_RunLog% 2>%_ErrorLog%

::Action !!! Generate the documentation !!!
doxygen "%_BaseDir%\Doxyfile" >>%_RunLog% 2>>%_ErrorLog%


::SLEEP FOR 3 SECONDS AND SAY THAT WE  ARE DONE 
for /l %%i in (3,-1,0) do CLS&@echo off&ECHO DONE EXIT IN %%i SECONDS &ping localhost -n 2 >NUL